<?php

namespace app\admin\controller;

use think\Controller;
use app\common\model\ReplyModel;

class WechatreplyController extends Controller
{
    public function focus()
    {
        $reply=new ReplyModel;
        if($this->request->isAjax())
        {
            $result=$reply->addOnlyReply($this->request->post(),"focus");
            return \zbcjson($result,$result?"修改成功":"修改失败");
        }
        
        $result=$reply->getReply("focus");
        $this->assign("model",$result);
        return view();
    }
    
    public function invalid()
    {
        $reply=new ReplyModel;
        if($this->request->isAjax())
        {
            $result=$reply->addOnlyReply($this->request->post(),"invalid");
            return \zbcjson($result,$result?"修改成功":"修改失败");
        }
        
        $result=$reply->getReply("invalid");
        $this->assign("model",$result);
        return view();
    }

    public function update()
    {
        if($this->request->isAjax())
        {
            return json("true");
        }
        return view();
    }
}